# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks-old
pkgname=kinit5
pkgver=5.115.0
pkgrel=0
pkgdesc="Process launcher to speed up launching KDE applications"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="
	kconfig5-dev
	kcrash5-dev
	ki18n5-dev
	kio5-dev
	kservice5-dev
	kwindowsystem5-dev
	libcap-dev
	qt5-qtbase-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	kdoctools5-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kinit.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kinit-$pkgver.tar.xz"
options="!check suid" # No tests
builddir="$srcdir/kinit-$pkgver"

replaces="kinit<=5.110.0-r0"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
bb8026aee90a2be5314ad941c31554f5f9e59ed387fc4cf393486485ad530bdb8a6cb8f020f90472c5241190404730ed0a70025ea24b9536bba5ba5bc123ea7f  kinit-5.115.0.tar.xz
"
